<template>
	<view class="talent">
		<ShopList :list="shopList" @clickFun="send"></ShopList>
		<u-toast ref="uToast" />
	</view>
</template>

<script>
	import ShopList from '../components/shop-list/index.vue'
	export default {
		components: {
			ShopList
		},
		data() {
			return {
				shopList: [
					{
						id: 1,
						title: '名字名字',
						url: 'http://img3m3.ddimg.cn/69/34/1510438713-1_b_1.jpg',
						fans_num: '6.8',
						price: '500',
						location: '杭州'
					},
					{
						id: 2,
						title: '名字名字',
						url: 'http://img3m3.ddimg.cn/69/34/1510438713-1_b_1.jpg',
						fans_num: '6.8',
						price: '500',
						location: '杭州'
					},
					{
						id: 3,
						title: '名字名字',
						url: 'http://img3m3.ddimg.cn/69/34/1510438713-1_b_1.jpg',
						fans_num: '6.8',
						price: '500',
						location: '杭州'
					}
				],
			};
		},
		methods: {
			send(e,item){
				console.log(e,item);
				let that = this;
				switch(e) {
				    case 'cancel':
				        break;
					case 'details':
						uni.navigateTo({
							url: '/pages/mine/sample/sampleDetails',
						})	
					    break;
				    case 'contact':
				        break;
				    default:
				} 
			},
			Sample(e){
				console.log(e)
			},
			tabsChange(index) {
				this.swiperCurrent = index;
			},
			transition(e) {
				let dx = e.detail.dx;
				this.$refs.tabs.setDx(dx);
			},
			animationfinish(e) {
				let current = e.detail.current;
				this.$refs.tabs.setFinishCurrent(current);
				this.swiperCurrent = current;
				this.current = current;
			},
			onreachBottom() {
				
			}
		}
	};
</script>

<style lang="scss" scoped>
.talent {
	display: flex;
	flex-direction: column;
	height: calc(100vh - var(--window-top));
	.swiper-box {
		flex: 1;
		.swiper-item {
			height: 100%;
		}
	}
	.sample-box{
		padding: 40rpx 40rpx 20rpx;
		.item{
			&.mc{ border-bottom:1px solid #999; }
			.lab{
				.xin{ color:#dc1e32; }
			}
		}
	}
	
}
</style>
